﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WpfApplication1.RssFeedService;
using System.Windows;

namespace WPFClient
{
    public class utils
    {
        public int current;
        private Session _session;
        private RssFeedServiceClient _rfs;
        public MainWindow _win;
        public rssFeed rssWin;
        public Dictionary<int, RssList> RssDico;
        public Dictionary<int, RssList> RssPublicDico;

        public void setSession(Session session)
        {
            this._session = session;
        }

        public Session getSession()
        {
            return (_session);
        }

        public void setRfs(RssFeedServiceClient rfs)
        {
            this._rfs = rfs;
        }

        public RssFeedServiceClient getRfs()
        {
            return (_rfs);
        }

        public RssList getRssListByRssFeedName(String _name)
        {
            for (int i = 0; i != this.RssDico.Count; i++)
            {
                if (RssDico[i].name.Equals(_name))
                    return RssDico[i];
            }
            return null;
        }

        public void refreshListFeed()
        {

        }
    }
}
